import sw.opencl.SW_OpenCL_V3;
import sw.serial.SmithWaterman_Serial;
import sw.utils.Devices;
import sw.utils.JOCLUtils;

/**
 * 
 */

/**
 * @author Chung
 *
 */
public class Program {
	
	public static void main(String[] s) {
		
		for ( int i = 0; i < 5; i++) {
			String U = JOCLUtils.generateSequenceStringWithLength(10000);
			String V = JOCLUtils.generateSequenceStringWithLength(10000);
//			String U = "ANANAS";
//			String V = "BANANE";
			int uLength = U.length();
			int vLength = V.length();
			
			// calculate subSize's value
			int subSize = JOCLUtils.getGreatestDivisor(uLength, vLength);
			
			System.out.println("SUB SIZE: " + subSize);
			
//			SW_OpenCL_V3 nvidiaGPU = new SW_OpenCL_V3(Devices.NVIDIA_PLATFORM, Devices.NVIDIA_GPU);
//			nvidiaGPU.sw(U, V, 20);
			
			SW_OpenCL_V3 intelCPU = new SW_OpenCL_V3(Devices.INTEL_PLATFORM, Devices.INTEL_CPU);
			intelCPU.sw(U, V, subSize);
			
			SmithWaterman_Serial serial = new SmithWaterman_Serial(U, V);
			serial.alignment();
			
//			System.out.println(JOCLUtils.isPassed(openMatrixIntelCPU, serialMatrix));
			
		}
	}
	
}
